package org.itboys.core.entity.mongo;

import lombok.Data;
import org.itboys.mongodb.entity.BaseMongoEntity;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

/**
 * @Author：贾琦磊
 * @Date：2018/11/26
 * @Description：用户
 */
@Data
@Entity(value = "SundayMember",noClassnameStored = true)
public class SundayMember extends BaseMongoEntity{
    private String realName;//真实姓名
    private String nickName;//昵称
    @Indexed(unique=true)
    private String mobile;//手机号。用户注册标识
    private Integer userType;//用户类型。1租赁端普通用户，2租赁端企业用户 3，供应商
    private Integer thirdType;//APP登录类型  0,手机号1,微信 2,qq 3,支付宝
    private String image;//头像
    private String password;//密码。md5加密
    private String weixinUnionId;//微信unionId
    private String qqUnionId;//腾讯QQunionId
    private String alipayUnionId;//支付宝unionId、
    private Integer status;//用户审核状态
    /**↓↓↓↓↓↓项目新加↓↓↓↓↓↓*/
    private String company;//公司名称
    private String permit;//执照
    private Long provinceId;//省ID
    private String provinceName;//省名称
    private Long cityId;//市Id
    private String cityName;//市名称
    private Long districtId;//区ID
    private String districtName;//区名称
    private Integer accepted;//已接收邀请，0未接受，1已接受

    public SundayMember() {
    }

    /**web端新增/修改供应商账号数据封装*/
    public SundayMember(String realName, String mobile, Integer userType, Integer status,String password, Long provinceId, String provinceName, Long cityId, String cityName, Long districtId, String districtName) {
        this.realName = realName;
        this.mobile = mobile;
        this.userType = userType;
        this.password = password;
        this.status = status;
        this.provinceId = provinceId;
        this.provinceName = provinceName;
        this.cityId = cityId;
        this.cityName = cityName;
        this.districtId = districtId;
        this.districtName = districtName;
    }
}
